<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>栏目管理 -- 修改子栏目</title>
<link href='css/base.css' rel='stylesheet' type='text/css'>
<style>
.exshow {
	background:url(img/tbody_toggle.gif) 0 -15px no-repeat;
	width:50px;
	height:15px;
	font-size:0px;
	color:#fafafa;
	cursor:pointer;
}
.exhide {
	background:url(img/tbody_toggle.gif) no-repeat;
	width:50px;
	height:15px;
	font-size:0px;
	color:#fafafa;
	cursor:pointer;
}
.ctbody {
	
}
a.exbody {
	color:#fafafa;
}
.fl {
	float:left;
}
</style>
<script language="javascript" src="../images/js/j.js"></script>
<script language="javascript">
	
$(function(){
	ExbodyClick();
});
function ExbodyClick()
{
	$("a.exbody").click(function(){
  	if( $("tr.ctbody").get(0).style.display=="none") {
  		$(".ctbody").show();
  		$(".exbody div").get(0).className="exhide";
  	}
  	else {
  		$(".ctbody").hide();
  		$(".exbody div").get(0).className="exshow";
  	}
	});
}
function ShowHideHelp(spanid)
{
	if( $("#"+spanid).get(0).style.display=="none") {
		$("#"+spanid).show();
	} else {
		$("#"+spanid).hide();
	}
}

function SelectTemplets(fname) {
   if(document.all){
     var posLeft = window.event.clientY-100;
     var posTop = window.event.clientX-400;
   }
   else{
     var posLeft = 100;
     var posTop = 100;
   }
   window.open("../include/dialog/select_templets.php?f="+fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left="+posLeft+", top="+posTop);
}

function ShowHide(objname) {
  if(obj.style.display != "none") $("#"+objname).hide();
  else $("#"+objname).show();
}

function ShowObj(objname) {
   $("#"+objname).show();
}

function HideObj(objname) {
  $("#"+objname).hide();
}

function CheckTypeDir() {
  var upinyin = document.getElementById('upinyin');
  var tpobj = document.getElementById('typedir');
  if(upinyin.checked) tpobj.style.display = "none";
  else tpobj.style.display = "block";
}

function checkSubmit()
{
   if(document.form1.typename.value=="")
   {
		  alert("栏目名称不能为空！");
		  document.form1.typename.focus();
		  return false;
	 }
	 return true;
}

</script>
</head>
<body leftmargin='15' topmargin='10'>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111" style="BORDER-COLLAPSE: collapse">
  <tr>
    <td width="100%" height="30">
       <IMG height=14 src="img/book1.gif" width=20>
       &nbsp;<a href="catalog_main.php"><strong>栏目管理</strong></a> &gt;&gt; <strong>修改子栏目</strong>
    </td>
  </tr>
</table>
<form name="form1" action="catalog_edit.php" method="post" onSubmit="return checkSubmit();">
  <input type="hidden" name="dopost" value="save" />
  <input type="hidden" name="id" id="id" value="<?php echo $myrow['id']; ?>" />
  <input type="hidden" name="topid" id="topid" value="<?php echo $topid; ?>" />
<table width="98%" border="0"  id="needset" cellspacing="0" cellpadding="0">
      <tr>
         <td height="28" background="img/newlinebg5.gif" colspan="2" style="border-top:1px solid #D7D8D1" class='bline'>
          &nbsp;<strong>必选的项目：</strong>
         </td>
      </tr>
      <tr>
            <td class='bline' width="20%" height="26"><strong><font color='red'>&nbsp;内容模型：</font></strong></td>
            <td class='bline' width="80%">
            	
           <select name="channeltype" id="channeltype" style="width:200px">
            <?php
            $channelid = $myrow['channelid'];
            foreach($channelArray as $k=>$arr)
            {
            	if($k==$channelid)
            	{
            		$nid = $arr['nid'];
            		echo "    <option value='{$k}' selected>{$arr['typename']}|{$arr['nid']}</option>\r\n";
              }
              else
              {
              	  echo "    <option value='{$k}'>{$arr['typename']}|{$arr['nid']}</option>\r\n";
          		}
            }
            ?>
              </select>            </td>
      </tr>
      <tr>
           <td class='bline' height="26"><strong><font color='red'>&nbsp;栏目名称：</font></strong></td>
           <td class='bline'>
           	<input name="typename" type="text" id="typename" size="30" class="iptxt" value="<?php echo $myrow['typename']; ?>" />
           </td>
    </tr>
	<tr>
            <td class='bline' height="26"><strong><font color='red'>&nbsp;栏目权限：</font></strong></td>
            <td class='bline'><select name="rank" id="rank" style="width:200px">
                <?php
				$check = "";
              $urank = $cuserLogin->getUserRank();
              $dsql->SetQuery("Select * from `#@__arcrank` where rank>0");
              $dsql->Execute();
              while($row = $dsql->GetObject())
              {
			  	if ($myrow['rank'] == $row->rank)
              	echo "     <option value='".$row->rank."'selected>".$row->membername."</option>\r\n";
				else
				echo "     <option value='".$row->rank."'>".$row->membername."</option>\r\n";
              }
              ?>
              </select></td>
    </tr>
       <tr>
            <td height="26" class='bline'><strong> &nbsp;排列顺序： </strong></td>
            <td class='bline'>
            	<input name="sortrank" size="6" type="text" class="pubinputs" value="<?php echo $myrow['sortrank']; ?>" style="width:60px" />
              （由低 -&gt; 高）
            </td>
       </tr>
       <tr>
            <td height="26" class='bline'><strong>&nbsp;文件保存目录：</strong></td>
            <td class='bline'>
                <input name="typedir" type="text" id="typedir" value="<?php echo $myrow['typedir']; ?>" class="pubinputs" style="width:350px" />
            </td>
        </tr>
        <tr>
            <td height="26" class='bline'>&nbsp;<strong>文 件 名：</strong></td>
            <td class='bline'>
            	<input name="defaultname" type="text" class="iptxt" id="defaultname" value="<?php echo $myrow['defaultname']; ?>" size="30" />
              <strong>(非单独内容页不要修改此项)</strong>
            </td>
        </tr>
        <tr>
            <td height="26" class='bline'><strong>&nbsp;栏目属性：</strong></td>
            <td class='bline'>
            	<input name="ispart" type="radio" id="radio" value="0" class='np' <?php if($myrow['ispart']==0) echo " checked"; ?> />
              最终列表栏目（允许在本栏目发布文档，并生成文档列表） <br>
              <input name="ispart" type="radio" id="radio" value="1" class='np' <?php if($myrow['ispart']==1) echo " checked"; ?> />
              频道封面（栏目本身不允许发布文档） <br>
              <input name="ispart" type="radio" id="radio" value="3" class='np' <?php if($myrow['ispart']==3) echo " checked"; ?> />
              仅为单独内容页（关于我们、公司简介之类） <br>
              <input name="ispart" type="radio" id="radio" value="2" class='np' <?php if($myrow['ispart']==2) echo " checked"; ?> />
              外部连接（在"文件保存目录"处填写网址） 
            </td>
        </tr>
        <tr>
            <td class='bline' background="img/newlinebg5.gif">
            	<div style='float:left'><strong>&nbsp;高级内容：</strong></div>
            	<div style='float:left;margin-left:6px'><a href='#' class='exbody'><div class='exhide'>展开/收缩</div></a></div>            </td>
			      <td class='bline' background="img/newlinebg5.gif">&nbsp;			      </td>
        </tr>
        <tr class='ctbody'>
            <td height="65"  class='bline'><strong>&nbsp;关 键 字：</strong></td>
            <td  class='bline'>
            	<input type="input" name="keywords" id="keywords" class="alltxt" style="width:420px" value="<?php echo $myrow['keywords']; ?>" />
            </td>
        </tr>
        <tr class='ctbody'>
            <td height="65"  class='bline'><strong>&nbsp;页面摘要：</strong></td>
            <td height="65"  class='bline'>
            	<textarea name="description" cols="70" rows="4" id="description" class="alltxt" style="width:420px;height:60px"><?php echo $myrow['description']; ?></textarea>
            </td>
        </tr>
        <tr class='ctbody'>
            <td class='bline'>
            	<strong>&nbsp;页面内容：</strong>
            </td>
			      <td class='bline'>
			      	(栏目页面内容是栏目模板中直接调用的HTML信息，调用标签为{rsms:field name='content' /})
			     </td>
        </tr>
        <tr class='ctbody'>
         <td colspan="2">
          <?php
	            GetEditor("content",$myrow['content'],"450","Default","print","false");
	        ?>
	      </td>
      </tr>
    </table>
    
    <table width="98%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
            <td width="1%" height="50"></td>
            <td width="99%" valign="bottom">
<input name="imageField" type="image" src="img/button_ok.gif" width="60" height="22" border="0" class="np" />
&nbsp;&nbsp;&nbsp;
            <a href="catalog_main.php"><img src="img/button_back.gif" width="60" height="22" border="0" /></a>
			</td>
    </tr>
  </table>
</form>
</body>
</html>
